<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>用户个人资料</title>
    <link rel="stylesheet" href="{{ url_for('static', filename='css/style.css') }}">
</head>
<body>
    <div class="container">
        <h1>用户个人资料</h1>
        
        <form method="POST" action="{{ url_for('user_profile', user_id=user_id) }}">
            <div class="form-group">
                <label for="username">查询用户名:</label>
                <input type="text" id="username" name="username" required>
            </div>
            
            <div class="form-group">
                <label for="tags">选择用户标签:</label>
                <select id="tags" name="tags" multiple>
                    {% for tag in user_tags %}
                        <option value="{{ tag.id }}">{{ tag.name }}</option>
                    {% endfor %}
                </select>
            </div>
            
            <button type="submit">查询用户</button>
        </form>

        {% if users %}
            <h2>符合条件的用户:</h2>
            <ul>
                {% for user in users %}
                    <li>{{ user.username }}</li>
                {% endfor %}
            </ul>
        {% endif %}
    </div>
</body>
</html>